#pragma once

#include "WatermarkManager.h"
#include "BufferQueue.h"
#include <utils/Thread.h>
#include "WMarkBuffer.h"

namespace android {

class WatermarkManager;

class ReaderThread: public Thread {
public:
    ReaderThread(WatermarkManager* manager, BufferQueue<WMarkBuffer>* queue);
    ~ReaderThread();
    void start();
    void stop();

private:
    virtual bool threadLoop() override;
    int mFd;

    virtual int recvMsg(WMarkBuffer* buf);


    WatermarkManager* mManager;
    BufferQueue<WMarkBuffer>* mBufferQueue;

    int mTestCount;
};

} //namespace
